#ifndef _MainTools_h__
#define _MainTools_h__

#include "Global.h"





class MainTools
	: public CCNode
	, public CCBMemberVariableAssigner
	, public CCBSelectorResolver
	, public CCNodeLoaderListener
	, public ViewBase
{
public:
	CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(MainTools, create);

	MainTools(void);
	~MainTools(void);

	virtual SEL_MenuHandler onResolveCCBCCMenuItemSelector(CCObject * pTarget, CCString * pSelectorName);
	virtual SEL_CCControlHandler onResolveCCBCCControlSelector(CCObject * pTarget, CCString * pSelectorName);
	virtual bool onAssignCCBMemberVariable(CCObject * pTarget, CCString * pMemberVariableName, CCNode * pNode);
	virtual void onNodeLoaded(CCNode * pNode, CCNodeLoader * pNodeLoader);
	bool init();
	void refresh();
	void onEnter();
	void onExit();
private:
	CCLabelTTF* mName;
	void _onNotification(CCObject* object);
	void onTaskBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);	
    void onEquipBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);	
    void onAttributeClick(CCObject * pSender, CCControlEvent pCCControlEvent);	
    void onItemBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);	
    void onChallengeBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);	
    void onGrabBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);	
    void onMessageBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);	
    void onMysteryShopBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);	
    void onShopBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);	
    void onSystemBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);	
    void onMeltBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);	
};

#endif